.class public Lcom/estrongs/android/ui/view/ColorAnimationView;
.super Landroid/view/View;
.source "ColorAnimationView.java"

# interfaces
.implements Landroid/animation/ValueAnimator$AnimatorUpdateListener;
.implements Landroid/animation/Animator$AnimatorListener;


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/ui/view/ColorAnimationView$b;,
        Lcom/estrongs/android/ui/view/ColorAnimationView$c;
    }
.end annotation


# instance fields
.field private a:Landroid/animation/ValueAnimator;

.field private b:Landroid/graphics/drawable/GradientDrawable;

.field private c:Lcom/estrongs/android/ui/view/ColorAnimationView$b;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 1
    invoke-direct {p0, p1, v0, v1}, Lcom/estrongs/android/ui/view/ColorAnimationView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    .line 2
    invoke-direct {p0, p1, p2, v0}, Lcom/estrongs/android/ui/view/ColorAnimationView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 3
    invoke-direct {p0, p1, p2, p3}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x0

    .line 4
    iput-object p1, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->a:Landroid/animation/ValueAnimator;

    return-void
.end method

.method private a([Ljava/lang/Object;)V
    .locals 2

    .line 4
    iget-object v0, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->a:Landroid/animation/ValueAnimator;

    if-nez v0, :cond_0

    .line 5
    new-instance v0, Lcom/estrongs/android/ui/view/ColorAnimationView$c;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Lcom/estrongs/android/ui/view/ColorAnimationView$c;-><init>(Lcom/estrongs/android/ui/view/ColorAnimationView;Lcom/estrongs/android/ui/view/ColorAnimationView$a;)V

    invoke-static {v0, p1}, Landroid/animation/ValueAnimator;->ofObject(Landroid/animation/TypeEvaluator;[Ljava/lang/Object;)Landroid/animation/ValueAnimator;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->a:Landroid/animation/ValueAnimator;

    const-wide/16 v0, 0xbb8

    .line 6
    invoke-virtual {p1, v0, v1}, Landroid/animation/ValueAnimator;->setDuration(J)Landroid/animation/ValueAnimator;

    .line 7
    iget-object p1, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->a:Landroid/animation/ValueAnimator;

    invoke-virtual {p1, p0}, Landroid/animation/ValueAnimator;->addUpdateListener(Landroid/animation/ValueAnimator$AnimatorUpdateListener;)V

    :cond_0
    return-void
.end method


# virtual methods
.method public a(J)V
    .locals 1

    .line 3
    iget-object v0, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->a:Landroid/animation/ValueAnimator;

    invoke-virtual {v0, p1, p2}, Landroid/animation/ValueAnimator;->setCurrentPlayTime(J)V

    return-void
.end method

.method public a([Lcom/estrongs/android/ui/view/ColorAnimationView$b;)V
    .locals 1

    if-eqz p1, :cond_0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/view/ColorAnimationView;->a([Ljava/lang/Object;)V

    return-void

    .line 2
    :cond_0
    new-instance p1, Ljava/lang/RuntimeException;

    const-string v0, "colors is null"

    invoke-direct {p1, v0}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;)V

    throw p1
.end method

.method public onAnimationCancel(Landroid/animation/Animator;)V
    .locals 0

    return-void
.end method

.method public onAnimationEnd(Landroid/animation/Animator;)V
    .locals 0

    return-void
.end method

.method public onAnimationRepeat(Landroid/animation/Animator;)V
    .locals 0

    return-void
.end method

.method public onAnimationStart(Landroid/animation/Animator;)V
    .locals 0

    return-void
.end method

.method public onAnimationUpdate(Landroid/animation/ValueAnimator;)V
    .locals 0

    .line 1
    invoke-virtual {p1}, Landroid/animation/ValueAnimator;->getAnimatedValue()Ljava/lang/Object;

    move-result-object p1

    check-cast p1, Lcom/estrongs/android/ui/view/ColorAnimationView$b;

    iput-object p1, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->c:Lcom/estrongs/android/ui/view/ColorAnimationView$b;

    .line 2
    invoke-virtual {p0}, Landroid/view/View;->invalidate()V

    return-void
.end method

.method protected onDraw(Landroid/graphics/Canvas;)V
    .locals 5

    .line 1
    invoke-super {p0, p1}, Landroid/view/View;->onDraw(Landroid/graphics/Canvas;)V

    .line 2
    iget-object p1, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->c:Lcom/estrongs/android/ui/view/ColorAnimationView$b;

    if-nez p1, :cond_0

    return-void

    .line 3
    :cond_0
    new-instance p1, Landroid/graphics/drawable/GradientDrawable;

    sget-object v0, Landroid/graphics/drawable/GradientDrawable$Orientation;->TOP_BOTTOM:Landroid/graphics/drawable/GradientDrawable$Orientation;

    const/4 v1, 0x2

    new-array v1, v1, [I

    const/4 v2, 0x0

    iget-object v3, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->c:Lcom/estrongs/android/ui/view/ColorAnimationView$b;

    iget v4, v3, Lcom/estrongs/android/ui/view/ColorAnimationView$b;->a:I

    aput v4, v1, v2

    const/4 v2, 0x1

    iget v3, v3, Lcom/estrongs/android/ui/view/ColorAnimationView$b;->b:I

    aput v3, v1, v2

    invoke-direct {p1, v0, v1}, Landroid/graphics/drawable/GradientDrawable;-><init>(Landroid/graphics/drawable/GradientDrawable$Orientation;[I)V

    iput-object p1, p0, Lcom/estrongs/android/ui/view/ColorAnimationView;->b:Landroid/graphics/drawable/GradientDrawable;

    .line 4
    sget v0, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v1, 0x10

    if-lt v0, v1, :cond_1

    .line 5
    invoke-virtual {p0, p1}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V

    goto :goto_0

    .line 6
    :cond_1
    invoke-virtual {p0, p1}, Landroid/view/View;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    :goto_0
    return-void
.end method
